﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/WebMaster.Master" AutoEventWireup="true"
    CodeBehind="ReceivableDetail.aspx.cs" Inherits="MaxStudio.Concrete.Web.Pages.ReceivableDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script language="javascript" type="text/javascript">
        function CloseDialog() {
            $("#dialog").dialog("close");
        }
        function CloseEditDialog() {
            $("#EditDialog").dialog("close");
        }
        function OpenDialog() {
            $("#EditDialog").dialog("open");
            return false;
        }
        function OpenConfirmDialog() {
            $("#dialog-confirm").dialog("open");
            return false;
        }
        function CloseConfirmDialog() {
            $("#dialog-confirm").dialog("close");
            return false;
        }
        $(function() {
            var dlg = jQuery("#dialog").dialog({
                draggable: true,
                resizable: true,
                closed: true,
                show: 'Transfer',
                hide: 'Transfer',
                autoOpen: false,
                width: 600,
                minHeight: 10,
                minwidth: 10
            });
            dlg.parent().appendTo(jQuery("form:first"));

            var Editdlg = jQuery("#EditDialog").dialog({
                draggable: true,
                resizable: true,
                closed: true,
                show: 'Transfer',
                hide: 'Transfer',
                autoOpen: false,
                width: 600,
                minHeight: 10,
                minwidth: 10
            });
            Editdlg.parent().appendTo(jQuery("form:first"));

            var confirm = jQuery("#dialog-confirm").dialog({
                draggable: true,
                resizable: true,
                closed: true,
                show: 'Transfer',
                hide: 'Transfer',
                autoOpen: false,
                width: 300,
                minHeight: 10,
                minwidth: 10
            });
            confirm.parent().appendTo(jQuery("form:first"));
        });
        $(function() {
            $("#dialog-confirm").dialog({
                resizable: false,
                autoOpen: false,
                height: 140,
                modal: true
            });
        });

           
    </script>

    <div class="LinkMap">
        >>我的位置 >> 应收款管理 >> 应收款管理
    </div>
    <div>
        <div id="tabs">
            <ul>
                <li><a href="#tabs-1">功能介绍</a></li>
                <li><a href="#tabs-2">应收款管理</a></li>
            </ul>
            <div id="tabs-1">
                Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
                incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
                exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div>
            <div id="tabs-2">
                <div style="width: auto; margin: 10px;">
                    <p>
                        <a href="#" id="dialog_link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin">
                        </span>添加应收款</a></p>
                    <!-- ui-dialog -->
                    <div id="dialog" title="添加应收款">
                        <div style="height: auto;">
                            <div>
                                <div style="width: 100px; float: left">
                                    合同编号:</div>
                                <div>
                                    <asp:Label runat="server" ID="lblContractId"></asp:Label>
                                </div>
                            </div>
                            <div>
                                <div style="width: 100px; float: left">
                                    客户名称:</div>
                                <div>
                                    <asp:Label runat="server" ID="lblCustomerName"></asp:Label>
                                </div>
                            </div>
                            <div>
                                <div style="width: 100px; float: left">
                                    下单日期:</div>
                                <asp:Label runat="server" ID="lblSignDate"></asp:Label>
                            </div>
                             <div>
                                <div style="width: 100px; float: left">
                                    应收总款:</div>
                                <asp:Label runat="server" ID="Label1"></asp:Label>
                            </div>
                              <div>
                                <div style="width: 100px; float: left">
                                    已收款项:</div>
                                <asp:Label runat="server" ID="Label3"></asp:Label>
                            </div>
                             <div>
                                <div style="width: 100px; float: left">
                                    剩余应收:</div>
                                <asp:Label runat="server" ID="Label2"></asp:Label>
                            </div>
                             
                              <%-- <div style="text-align: center;">
                                               <asp:GridView ID="gvReceivableDetailList" runat="server" CssClass="GridViewStyle" OnRowCommand="gvReceivableDetailList_RowCommand"
                                DataKeyNames="Id" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True"
                                OnPageIndexChanging="gvReceivableDetailList_PageIndexChanging" PageSize="999">
                                <FooterStyle CssClass="GridViewFooterStyle" />
                                                <RowStyle BackColor="#EFF3FB" />
                                                <Columns>
                                                    <asp:BoundField DataField="ProductId" HeaderText="ProductId" Visible="false" />
                                                    <asp:BoundField DataField="Product" HeaderText="产品" />
                                                    <asp:BoundField DataField="Unit" HeaderText="单位" />
                                                    <asp:BoundField DataField="UnitId" HeaderText="UnitId" Visible="false"   />
                                                    <asp:BoundField DataField="Count" HeaderText="数量" />
                                                    <asp:CommandField ShowDeleteButton="True" DeleteText="删除" />
                                                </Columns>
                                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                                <EditRowStyle BackColor="#2461BF" />
                                                <AlternatingRowStyle BackColor="White" />
                                            </asp:GridView>
                                        </div> --%>
                            <br />
                            <div style="width: 500px; text-align: right">
                                <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click"
                                    OnClientClick="CloseDialog()" />
                                <input id="btnCancel" type="button" value="Cancel" onclick="CloseDialog()" />
                            </div>
                        </div>
                    </div>
                    <!-- ui- edit dialog -->
                    <div id="EditDialog" title="联系人修改">
                        <asp:UpdatePanel ID="UPEdit" runat="server">
                            <ContentTemplate>
                                <div style="height: auto;">
                                    <asp:Label runat="server" ID="lbEidtId" Visible="false"></asp:Label>
                                    
                                    <div>
                                        最后修改人:
                                        <asp:Label runat="server" ID="lbLastModier"></asp:Label>
                                    </div>
                                    <div>
                                        最后修改时间:
                                        <asp:Label runat="server" ID="lbLastModifyDate"></asp:Label>
                                    </div>
                                    <br />
                                    <div style="width: 500px; text-align: right">
                                        <asp:Button ID="btnEdit" runat="server" Text="Submit" OnClick="btnEdit_Click" OnClientClick="CloseEditDialog()" />
                                        <input id="btnCancelEdit" type="button" value="Cancel" onclick="CloseEditDialog()" />
                                    </div>
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
                    <!-- ui- delete dialog -->
                    <div id="dialog-confirm" title="删除确认?">
                        <asp:UpdatePanel ID="upDelete" runat="server">
                            <ContentTemplate>
                                <p>
                                    <span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
                                    确定要删除吗？</p>
                                <asp:Label runat="server" ID="lbDeleteId" Visible="false"></asp:Label>
                                <div style="width: 270px; text-align: right">
                                    <asp:Button ID="btnConfirmDelete" runat="server" Text="Submit" OnClick="btnDelete_Click"
                                        OnClientClick="CloseConfirmDialog()" />
                                    <input id="btnCancelDelete" type="button" value="Cancel" onclick="CloseConfirmDialog()" />
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
                    <asp:UpdatePanel ID="UPGridView" runat="server">
                        <ContentTemplate>
                            <asp:GridView ID="gvReceivableDetailList" runat="server" CssClass="GridViewStyle"
                                OnRowCommand="gvReceivableDetailList_RowCommand" DataKeyNames="Id" AutoGenerateColumns="False"
                                AllowPaging="True" AllowSorting="True" OnPageIndexChanging="gvReceivableDetailList_PageIndexChanging"
                                PageSize="20">
                                <FooterStyle CssClass="GridViewFooterStyle" />
                                <RowStyle CssClass="GridViewRowStyle" />
                                <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                                <PagerStyle CssClass="GridViewPagerStyle" />
                                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                <HeaderStyle CssClass="GridViewHeaderStyle" />
                                <Columns>
                                        <asp:BoundField DataField="Id" HeaderText="Id" Visible="false" />
                                     
                                    <asp:BoundField DataField="CreateDate" HeaderText="创建时间" />
                                    <asp:BoundField DataField="ModifyDate" HeaderText="修改时间" />
                                    <asp:TemplateField HeaderText="修改">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lbtnEdit" runat="server" CausesValidation="False" CommandName="Select"
                                                Text="修改" CommandArgument='<%# Bind("Id") %>' OnClientClick="OpenDialog();"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="删除">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lbtnDelete" runat="server" CausesValidation="False" CommandName="del"
                                                Text="删除" CommandArgument='<%# Bind("Id") %>' OnClientClick="OpenConfirmDialog()"></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
